home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / System / AsyncioPPC / include / clib / asyncio_protos.h
C/C++ Source or Header  |  2000-05-10  |  4KB  |  128 lines

  1. #ifndef CLIB_ASYNCIO_PROTOS_H
  2. #define CLIB_ASYNCIO_PROTOS_H
  3. #ifndef LIBRARIES_ASYNCIO_H
  4. #include <libraries/asyncio.h>
  5. #endif
  6.  
  7. /* Functions for asycioppc V40.0 */
  8.  
  9. /* These are the functions for the M68K side of your program !! */
  10.  
  11. #ifndef __PPC__
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. struct AsyncFile *OpenAsync(STRPTR fileName,ULONG mode,LONG bufferSize);
  18. struct AsyncFile *OpenAsyncFromFH(BPTR handle,ULONG mode,LONG bufferSize);
  19. LONG CloseAsync(struct AsyncFile *file);
  20. LONG ReadAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
  21. LONG ReadCharAsync(struct AsyncFile *file);
  22. LONG ReadLineAsync(struct AsyncFile *file,STRPTR buffer,LONG size);
  23. LONG WriteAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
  24. LONG WriteCharAsync(struct AsyncFile *file,ULONG ch);
  25. LONG WriteLineAsync(struct AsyncFile *file,STRPTR line);
  26. LONG SeekAsync(struct AsyncFile *file,LONG position,LONG mode);
  27. STRPTR FGetsAsync(struct AsyncFile *file,STRPTR buffer,LONG size);
  28. STRPTR FGetsLenAsync(struct AsyncFile *file,STRPTR buffer,LONG size,LONG *length);
  29. LONG PeekAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
  30.  
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34.  
  35. #else
  36.  
  37. /* V40 functions */
  38.  
  39. /* These are the functions for the PPC-WOS side of your program !! */
  40.  
  41. extern "AmigaLib" AsyncIOBase
  42. {
  43. struct AsyncFile *OpenAsyncPPC_(struct Library *,STRPTR,ULONG,LONG)=-0x6c;
  44. struct AsyncFile *OpenAsyncFromFHPPC_(struct Library *,BPTR,ULONG,LONG)=-0x72;
  45. LONG CloseAsyncPPC_(struct Library *,struct AsyncFile *)=-0x78;
  46. LONG ReadAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0x84;
  47. LONG ReadCharAsyncPPC_(struct Library *,struct AsyncFile *)=-0x90;
  48. LONG ReadLineAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR,LONG)=-0x9c;
  49. LONG WriteAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0x8a;
  50. LONG WriteCharAsyncPPC_(struct Library *,struct AsyncFile *,ULONG)=-0x96;
  51. LONG WriteLineAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR)=-0xa2;
  52. LONG SeekAsyncPPC_(struct Library *,struct AsyncFile *,LONG,LONG)=-0x7e;
  53. STRPTR FGetsAsyncPPC_(struct Library *,struct AsyncFile *file,STRPTR,LONG)=-0xa8;
  54. STRPTR FGetsLenAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR,LONG,LONG *)=-0xae;
  55. LONG PeekAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0xb4;
  56. }
  57.  
  58. extern struct Library *AsyncIOBase;
  59.  
  60. __inline struct AsyncFile *OpenAsyncPPC(STRPTR a1,ULONG a2,LONG a3)
  61. {
  62. return OpenAsyncPPC_(AsyncIOBase,a1,a2,a3);
  63. }
  64.  
  65. __inline struct AsyncFile *OpenAsyncFromFHPPC(BPTR a1,ULONG a2,LONG a3)
  66. {
  67. return OpenAsyncFromFHPPC_(AsyncIOBase,a1,a2,a3);
  68. }
  69.  
  70. __inline LONG CloseAsyncPPC(struct AsyncFile *a1)
  71. {
  72. return CloseAsyncPPC_(AsyncIOBase,a1);
  73. }
  74.  
  75. __inline LONG ReadAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
  76. {
  77. return ReadAsyncPPC_(AsyncIOBase,a1,a2,a3);
  78. }
  79.  
  80. __inline LONG ReadCharAsyncPPC(struct AsyncFile *a1)
  81. {
  82. return ReadCharAsyncPPC_(AsyncIOBase,a1);
  83. }
  84.  
  85. __inline LONG ReadLineAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3)
  86. {
  87. return ReadLineAsyncPPC_(AsyncIOBase,a1,a2,a3);
  88. }
  89.  
  90. __inline LONG WriteAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
  91. {
  92. return WriteAsyncPPC_(AsyncIOBase,a1,a2,a3);
  93. }
  94.  
  95. __inline LONG WriteCharAsyncPPC(struct AsyncFile *a1,ULONG a2)
  96. {
  97. return WriteCharAsyncPPC_(AsyncIOBase,a1,a2);
  98. }
  99.  
  100. __inline LONG WriteLineAsyncPPC(struct AsyncFile * a1,STRPTR a2)
  101. {
  102. return WriteLineAsyncPPC_(AsyncIOBase,a1,a2);
  103. }
  104.  
  105. __inline LONG SeekAsyncPPC(struct AsyncFile *a1,LONG a2,LONG a3)
  106. {
  107. return SeekAsyncPPC_(AsyncIOBase,a1,a2,a3);
  108. }
  109.  
  110. __inline STRPTR FGetsAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3)
  111. {
  112. return FGetsAsyncPPC_(AsyncIOBase,a1,a2,a3);
  113. }
  114.  
  115. __inline STRPTR FGetsLenAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3,LONG *a4)
  116. {
  117. return FGetsLenAsyncPPC_(AsyncIOBase,a1,a2,a3,a4);
  118. }
  119.  
  120. __inline LONG PeekAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
  121. {
  122. return PeekAsyncPPC_(AsyncIOBase,a1,a2,a3);
  123. }
  124.  
  125. #endif
  126.  
  127. #endif
  128.